package com.mf.all.entity.req;

import java.io.Serial;

import com.mf.all.groups.GroupsAddInterface;
import com.mf.all.groups.GroupsUpdateInterface;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.io.Serializable;

/**
 * 仓库区域提交
 *
 * @date 2025-04-02 22:36:45
 */
@Data
public class ReqWarehouseArea implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "id不能为空", groups = {GroupsUpdateInterface.class})
    @Null(message = "id不能为空", groups = {GroupsAddInterface.class})
    private Integer id;

    @Schema(description = "父区域iD")
    private Integer pid;


    @Schema(description = "区域名称")
    @NotBlank(message = "区域名称不能为空", groups = {GroupsUpdateInterface.class, GroupsUpdateInterface.class})
    private String areaName;

    @Schema(description = "所属仓库")
    @NotNull(message = "所属仓库不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private Integer warehouseId;

    @Schema(description = "区域编号")
    @NotBlank(message = "区域编号", groups = {GroupsUpdateInterface.class, GroupsUpdateInterface.class})
    private String code;

    @Schema(description = "区域备注")
    private String remark;
}
